package com.yanqu.road.entity.player;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Date;

@FieldTypeAnnotation(tableName = "t_u_real_reward")
public class UserRealReward extends DataObject {

    @FieldTypeAnnotation(desc = "玩家ID", select = true, update = true)
    private long userId;
    @FieldTypeAnnotation(desc = "编号", update = true)
    private int no;
    @FieldTypeAnnotation(desc = "道具ID")
    private int goodsId;

    @FieldTypeAnnotation(desc = "获得时间")
    private Date getTime;
    @FieldTypeAnnotation(desc = "填地址时间")
    private Date addrTime = new Date(0); // 默认0

    @FieldTypeAnnotation(desc = "地址")
    private String addr = "";
    @FieldTypeAnnotation(desc = "手机号")
    private String phone = "";


    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public int getNo() {
        return no;
    }

    public void setNo(int no) {
        if (this.no != no) {
            this.no = no;
            setOp(DataStatus.Update);
        }
    }

    public int getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(int goodsId) {
        if (this.goodsId != goodsId) {
            this.goodsId = goodsId;
            setOp(DataStatus.Update);
        }
    }

    public Date getGetTime() {
        return getTime;
    }

    public void setGetTime(Date getTime) {
        if (getTime == null) {
            return;
        }
        if (this.getTime == null || !this.getTime.equals(getTime)) {
            this.getTime = getTime;
            setOp(DataStatus.Update);
        }
    }

    public Date getAddrTime() {
        return addrTime;
    }

    public void setAddrTime(Date addrTime) {
        if (addrTime == null) {
            return;
        }
        if (this.addrTime == null || !this.addrTime.equals(addrTime)) {
            this.addrTime = addrTime;
            setOp(DataStatus.Update);
        }
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        if (addr == null) {
            return;
        }
        if (this.addr == null || !this.addr.equals(addr)) {
            this.addr = addr;
            setOp(DataStatus.Update);
        }
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        if (phone == null) {
            return;
        }
        if (this.phone == null || !this.phone.equals(phone)) {
            this.phone = phone;
            setOp(DataStatus.Update);
        }
    }

}
